{
	name:"MirrorPath",
	onInit(){
		this.ctrlIndex = -1
		this.mirror = true
	},
	onClick(pos,e,meta){
		if(this.step.isEmpty()){
			let mirror = this.queryMirrors(pos)
			if(mirror){
				let mng = this.loadMngByAction(mirror.action)
					mng.pathFocus(mirror)
				this.step.push(mng.getRotateMeta(mirror))
				this.toast("请选择中心线")
			}else
				this.toast("请选择目标路径")
			return
		}
		let line = this.queryLines(pos)
		if(line){
			this.onCommit(line,pos)
		}else{
			this.toast("请选择中心线")
		}
	},
	onCommit(line,pos){
		let tline = this.step[0]
		let cmeta = this.getLM(line,pos)
		this.step = tline.step.map(p=>{
			let mp = Math.mirrorPoint({
				x:p.x,
				y:p.y,
				a:cmeta.a+Math.PI/2
			},cmeta)
			mp.text = p.text||''
			return mp
		})
		let action = tline.action
		this.commit(action,this.name,tline.state)
	}
}